|
![](/i/fill.gif) |
"Corey Woodworth" <sch### [at] hotmail com> wrote in message
news:3d9daca5$1@news.povray.org...
> #if (vlength(Norm)!=0)
> sphere {
> Inter, .5
> texture {
> pigment {color green 1}
> }
> }
> #end
All that (vlength(Norm)!=0) is checking is that you've hit your hf (the only
time when vlength is 0 is when you've missed the object).
I haven't used trace for a while now, but iirc what you want to do is check
whether Norm.x and Norm.z are under a certain range. I think the following would
only place a sphere if the point was perfectly flat:
#if(Norm.x = 0 & Norm.z = 0 & Norm.y != 0)
sphere {
Inter, .5
texture {
pigment {color green 1}
}
}
#end
or, with a bit more give and take...
#if(abs(Norm.x) < 0.1 & abs(Norm.z) < 0.1 & Norm.y != 0)
sphere {
Inter, .5
texture {
pigment {color green 1}
}
}
#end
... but wait for corrections from others (untested).
Post a reply to this message
|
![](/i/fill.gif) |